﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="DanhSachSanPham.aspx.cs" Inherits="DanhSachSanPham" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

  <div class="art-post">
                              <div class="art-post-body">
                          <div class="art-post-inner art-article">
                                          <div class="art-postmetadataheader">
                                              <h2 class="art-postheader">Danh sách sản phẩm</h2>
                                          </div>
                                           <div class="art-postcontent">
                                           <table class="san_pham">
                                               <asp:ListView ID="ListView1" runat="server" 
                                                   EnableModelValidation="True">
                                                   
                                                   <LayoutTemplate>
                                                        
                                                       <div ID="itemPlaceholderContainer" runat="server" style="">
                                                           <span runat="server" id="itemPlaceholder" />
                                                       </div>
                                                       
                                                       <div style="margin: 10px; text-align: right; color:#93851B !important;">
                                                           <asp:DataPager ID="DataPager1" runat="server">
                                                               <Fields>
                                                                   <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" FirstPageText="<<" PreviousPageText="<"
                                                                       ShowNextPageButton="False" ShowPreviousPageButton="True" ButtonCssClass="pager_btn" />
                                                                   <asp:NumericPagerField />
                                                                   <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" 
                                                                       ShowNextPageButton="True" ShowPreviousPageButton="False" NextPageText=">" LastPageText=">>" ButtonCssClass="pager_btn"/>
                                                               </Fields>
                                                           </asp:DataPager>
                                                       </div>
                                                      
                                                       
                                                   </LayoutTemplate>
                                                  
                                                   
                                                   <EditItemTemplate>
                                                       <span style="">TenTL:
                                                       <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                                       <br />
                                                       TacGia:
                                                       <asp:TextBox ID="TacGiaTextBox" runat="server" Text='<%# Bind("TacGia") %>' />
                                                       <br />
                                                       HinhAnh:
                                                       <asp:TextBox ID="HinhAnhTextBox" runat="server" Text='<%# Bind("HinhAnh") %>' />
                                                       <br />
                                                       Gia:
                                                       <asp:TextBox ID="GiaTextBox" runat="server" Text='<%# Bind("Gia") %>' />
                                                       <br />
                                                       MoTa:
                                                       <asp:TextBox ID="MoTaTextBox" runat="server" Text='<%# Bind("MoTa") %>' />
                                                       <br />
                                                       <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                                                           Text="Update" />
                                                       <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                                                           Text="Cancel" />
                                                       <br />
                                                       <br />
                                                       </span>
                                                   </EditItemTemplate>
                                                   <EmptyDataTemplate>
                                                       <span>No data was returned.</span>
                                                   </EmptyDataTemplate>
                                                   <InsertItemTemplate>
                                                       <span style="">TenTL:
                                                       <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                                       <br />
                                                       TacGia:
                                                       <asp:TextBox ID="TacGiaTextBox" runat="server" Text='<%# Bind("TacGia") %>' />
                                                       <br />
                                                       HinhAnh:
                                                       <asp:TextBox ID="HinhAnhTextBox" runat="server" Text='<%# Bind("HinhAnh") %>' />
                                                       <br />
                                                       Gia:
                                                       <asp:TextBox ID="GiaTextBox" runat="server" Text='<%# Bind("Gia") %>' />
                                                       <br />
                                                       MoTa:
                                                       <asp:TextBox ID="MoTaTextBox" runat="server" Text='<%# Bind("MoTa") %>' />
                                                       <br />
                                                       <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                                                           Text="Insert" />
                                                       <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                                                           Text="Clear" />
                                                       <br />
                                                       <br />
                                                       </span>
                                                   </InsertItemTemplate>
                                                   <ItemTemplate>
                                                      
                                                  
                                                         <tr>
                                                            <td width="31%" >
                                                            <div class="book_border">
                                                                <img class="hinh_sp" src="images/Sach/<%# Eval("HinhAnh") %>" align="left" width="93" height="138"/>
                                                            </div>
                                                            <br />
                                                            <div class="gia_ban">Giá bán: <strong><%# Eval("DonGia") %> </strong>VNĐ</div>
                                                            <div class="bo_nut">
                                                                
                                                            <asp:LinkButton ID="btnAddToCart2" runat="server" BorderStyle="None"
                                                                     CommandArgument='<%# Eval("IDTaiLieu") %>' ><img width="22px" src="images/yellow-cart-md.png"  />   Thêm vào giỏ  </asp:LinkButton>
                                                          </div>
                                                            
                                                            </td>
                                                            <td>
                                                            <div class="ten">
                                                            <h5 style="margin: 5px !important; "><%# Eval("TenTL") %></h5>
                                                            </div>
                                                            <div class="tac_gia">
                                                            Tác giả: <%# Eval("TacGia")%>
                                                            </div>
                                                            <div class="mo_ta">
                                                            <%# Eval("MoTa") %>
                                                            </div>
                                                            </td>
                                                        </tr>
                                                   </ItemTemplate>
                                                   
                                                   <SelectedItemTemplate>
                                                       <span style="">TenTL:
                                                       <asp:Label ID="TenTLLabel" runat="server" Text='<%# Eval("TenTL") %>' />
                                                       <br />
                                                       TacGia:
                                                       <asp:Label ID="TacGiaLabel" runat="server" Text='<%# Eval("TacGia") %>' />
                                                       <br />
                                                       HinhAnh:
                                                       <asp:Label ID="HinhAnhLabel" runat="server" Text='<%# Eval("HinhAnh") %>' />
                                                       <br />
                                                       Gia:
                                                       <asp:Label ID="GiaLabel" runat="server" Text='<%# Eval("Gia") %>' />
                                                       <br />
                                                       MoTa:
                                                       <asp:Label ID="MoTaLabel" runat="server" Text='<%# Eval("MoTa") %>' />
                                                       <br />
                                                       <br />
                                                       </span>
                                                   </SelectedItemTemplate>
                                               </asp:ListView>
                                                 </table>
                                               <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                                   ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                                                   
                                                   
                                                  ></asp:SqlDataSource>
                                          </div>
                                          
                                          <div class="cleared"></div>
                          </div>
                          
                          		<div class="cleared"></div>
                              </div>
                          </div>


</asp:Content>

